import { createApp } from 'vue'
// import './style.css'
import App from './App.vue'
import router  from './router'
import { createPinia } from 'pinia'
import  PiniaPluginPersistedState  from  'pinia-plugin-persistedstate'
import '@/styles/common.scss'
import { lazyPlugin } from '@/directives'
import { componentPlugin } from "@/components/index.js";
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

for (const [key,component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key,component)
}

const pinia = createPinia()
pinia.use(PiniaPluginPersistedState)

app
    .use(pinia)
    .use(router)
    .use(lazyPlugin)
    .use(componentPlugin)
    .mount('#app')
